-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clang-tidy] Refactor: removed typos in 'AllowedTypes' option in various checks #122957
[clang-tidy] Refactor: removed typos in 'AllowedTypes' option in various checks #122957
Conversation
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
@llvm/pr-subscribers-clang-tidy Author: Baranov Victor (vbvictor) ChangesAdded right parenthesis to match left one. Full diff: https://github.com/llvm/llvm-project/pull/122957.diff 3 Files Affected:
diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst b/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst
index 01fde9580e2a08..9460802bf4eab4 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst
@@ -32,5 +32,5 @@ Options
iteration. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches
every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default
is empty. If a name in the list contains the sequence `::` it is matched
- against the qualified typename (i.e. `namespace::Type`, otherwise it is
+ against the qualified typename (i.e. `namespace::Type`), otherwise it is
matched against only the type name (i.e. `Type`).
diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst
index 837283811ddcce..4ad9dac3e38f66 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst
@@ -45,7 +45,7 @@ Options
copying. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches
every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default
is empty. If a name in the list contains the sequence `::` it is matched
- against the qualified typename (i.e. `namespace::Type`, otherwise it is
+ against the qualified typename (i.e. `namespace::Type`), otherwise it is
matched against only the type name (i.e. `Type`).
.. option:: ExcludedContainerTypes
diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst
index cc5e1ae73508c5..330ef960e9a3bb 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst
@@ -68,5 +68,5 @@ Options
Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches every type
with suffix `Ref`, `ref`, `Reference` and `reference`. The default is
empty. If a name in the list contains the sequence `::` it is matched against
- the qualified typename (i.e. `namespace::Type`, otherwise it is matched
+ the qualified typename (i.e. `namespace::Type`), otherwise it is matched
against only the type name (i.e. `Type`).
|
@llvm/pr-subscribers-clang-tools-extra Author: Baranov Victor (vbvictor) ChangesAdded right parenthesis to match left one. Full diff: https://github.com/llvm/llvm-project/pull/122957.diff 3 Files Affected:
diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst b/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst
index 01fde9580e2a08..9460802bf4eab4 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst
@@ -32,5 +32,5 @@ Options
iteration. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches
every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default
is empty. If a name in the list contains the sequence `::` it is matched
- against the qualified typename (i.e. `namespace::Type`, otherwise it is
+ against the qualified typename (i.e. `namespace::Type`), otherwise it is
matched against only the type name (i.e. `Type`).
diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst
index 837283811ddcce..4ad9dac3e38f66 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst
@@ -45,7 +45,7 @@ Options
copying. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches
every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default
is empty. If a name in the list contains the sequence `::` it is matched
- against the qualified typename (i.e. `namespace::Type`, otherwise it is
+ against the qualified typename (i.e. `namespace::Type`), otherwise it is
matched against only the type name (i.e. `Type`).
.. option:: ExcludedContainerTypes
diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst
index cc5e1ae73508c5..330ef960e9a3bb 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst
@@ -68,5 +68,5 @@ Options
Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches every type
with suffix `Ref`, `ref`, `Reference` and `reference`. The default is
empty. If a name in the list contains the sequence `::` it is matched against
- the qualified typename (i.e. `namespace::Type`, otherwise it is matched
+ the qualified typename (i.e. `namespace::Type`), otherwise it is matched
against only the type name (i.e. `Type`).
|
@HerrCai0907, Could you look at this PR, please. |
clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst
Outdated
Show resolved
Hide resolved
clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst
Outdated
Show resolved
Hide resolved
clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst
Outdated
Show resolved
Hide resolved
clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst
Outdated
Show resolved
Hide resolved
@EugeneZelenko Ping |
Sorry, I did commits so long time ago... I think @HerrCai0907 could help with that. |
iteration. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches | ||
every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EugeneZelenko should other single ticks also be replaced by double ticks?
For reference, generated HTML: https://clang.llvm.org/extra/clang-tidy/checks/performance/for-range-copy.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Single back-ticks are for option names and values. Double back-ticks for language constructs. Since Ref
, ref
, etc. refers to types, double-ticks should be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 👍 @vbvictor Can you please also make this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicovank, yes, I can make this change.
As far as I understand only Ref, ref, Reference and reference should be changed but not [Rr]ef(erence)?$.
It got a little tricky for me since Ref only refers to a suffix of a potential c++ type, so it doesn't fall into the double back-ticks category.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it also makes sense to double tick the regex (so everything here). Probably slightly easier on the eyes as a code block when generated than an italicized string.,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected to double-ticks plus found and fixed one more file with same errors: clang-tools-extra/docs/clang-tidy/checks/bugprone/assert-side-effect.rst
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
EDIT: Leaving this up 24 hours or so in case someone catches something else then I can press the merge button.
@vbvictor Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR. Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues. How to do this, and the rest of the post-merge process, is covered in detail here. If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again. If you don't get any reports, no action is required from you. Your changes are working as expected, well done! |
Added right parenthesis to match left one in description of 'AllowedTypes' option.